package my.game.Descension;

import java.util.ArrayList;
// For sorting and array manipulation.
import java.util.Arrays;

// Useful methods for combat.
public class Combat {

	private int progress;
	private Creature[] turnOrder;
	
	public Combat(Creature[] creatures) {
		getTurnOrder(creatures);
	}
	
	public int getDamage(int attack, int defense) {
		return 1;
	}
	
	public boolean isHit (int defender, int luck) {
		return true;
	}
	
	public int getHealValue(int healing, int currentHP) {
		return 1;
	}
	
	
	public void getTurnOrder(Creature[] creatures) {
		
		 ArrayList<Creature> newOrder = null;
		 for (int i = 0; i < creatures.length; i++) {
			 creatures[i].getSingleStat(7); // Nimbleness
			 
			 newOrder.add(creatures[i]);
		 }
		 
		 for (int k = 0; k < newOrder.size(); k++) {
			 if (newOrder.get(k).getSingleStat(7) > newOrder.get(k-1).getSingleStat(7))
				 ;
		 }
		 
		 
		 int i[] = {0, 0, 0};
		 
	}
	
	public int getMagicDamage(int magic, int defense) {
		return 1;
	}
	
	public void drawSlash(int anim, Creature creature) {
		
	}
	
	public void drawDeath(Creature creature) {
		
	}
	
	// Move things along.
	public void progressQueue() {
		progress++;
		if (progress > turnOrder.length)
			;
	}
	
	
}
